package cn.linjianhui.flink.sample.web.model;

import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

@Getter
@Setter
public class AreaPayStats {
    private BigDecimal payAmount;
    private String province;
    private String provinceCode;

    public AreaPayStats() {

    }

    public AreaPayStats(BigDecimal payAmount, String province, String provinceCode) {
        this.payAmount = payAmount;
        this.province = province;
        this.provinceCode = provinceCode;
    }

    public double getPayAmount() {
        if(payAmount != null) {
            return payAmount.setScale(4, BigDecimal.ROUND_HALF_EVEN).doubleValue();
        }
        return 0.0;
    }
}
